grammar swt;
 options{backtrack=true; memoize=true;} 

@lexer::header {
package org.eclipsecon.dui.dsl.swt.parser;

import org.openarchitectureware.xtext.parser.ErrorMsg;
import org.openarchitectureware.xtext.parser.impl.AntlrUtil;

}

@parser::header {
package org.eclipsecon.dui.dsl.swt.parser;

import org.eclipse.emf.common.util.Enumerator;
import org.eclipse.emf.ecore.EObject;

import org.openarchitectureware.xtext.parser.impl.AntlrUtil;
import org.openarchitectureware.xtext.XtextFile;
import org.openarchitectureware.xtext.parser.impl.EcoreModelFactory;
import org.openarchitectureware.xtext.parser.ErrorMsg;
import org.openarchitectureware.xtext.parser.model.ParseTreeManagerNeu;
import org.openarchitectureware.xtext.parser.parsetree.Node;

import org.eclipsecon.dui.dsl.swt.MetaModelRegistration;

}
@lexer::members {
	 private List<ErrorMsg> errors = new ArrayList<ErrorMsg>();
	public List<ErrorMsg> getErrors() {
		return errors;
	}

	public String getErrorMessage(RecognitionException e, String[] tokenNames) {
		String msg = super.getErrorMessage(e,tokenNames);
		errors.add(AntlrUtil.create(msg,e,tokenNames));
		return msg;
	}
}

@parser::members {

	private Token getLastToken() {
		return input.LT(-1);
	}

	protected Object convert(Object arg) {
		if (arg instanceof org.antlr.runtime.Token) {
			Token t = (Token) arg;
			String s = t.getText();
			if (t.getType() == swtLexer.RULE_ID && s.startsWith("^")) {
				return s.substring(1);
			} else if (t.getType()==swtLexer.RULE_STRING) {
				return s.substring(1,s.length()-1);
			} else if (t.getType()==swtLexer.RULE_INT) {
				return Integer.valueOf(s);
			}
			return s;
		}
		return arg;
	}


	private EcoreModelFactory factory = new EcoreModelFactory(MetaModelRegistration.getEPackage());
    private ParseTreeManagerNeu ptm = new ParseTreeManagerNeu();
	private XtextFile xtextfile = MetaModelRegistration.getXtextFile();
	
	{
			factory.addImport("", "platform:/resource/org.eclipsecon.dui.core/model/uimodel.ecore");
		
	}

	public ParseTreeManagerNeu getResult() {
		return ptm;
	}

	private List<ErrorMsg> errors = new ArrayList<ErrorMsg>();
	public List<ErrorMsg> getErrors() {
		return errors;
	}

	@Override
	public void reportError(RecognitionException e) {
		String msg = super.getErrorMessage(e,tokenNames);
		errors.add(AntlrUtil.create(msg,e,tokenNames));
		ptm.addError(msg, e);
		// This doesn't work. ANTLR may simply report an superfluous token. In that case,
		// two nodes will be finished instead of one.
		// ptm.ruleFinished(null, end());
	}

    private boolean skipCurrentToken;
    
	@Override
	protected boolean recoverFromMismatchedElement(IntStream arg0, RecognitionException arg1, BitSet arg2) {
		skipCurrentToken = true;
		return super.recoverFromMismatchedElement(arg0, arg1, arg2);
	}
}


parse returns [Node r]:
	 result=ruleMModel
	 // Always return the root node! This prevents that this method is called multiple times
	 // with interesting side effects.
{
if (result != null)
  ptm.setModelElement(result);
$r = ptm.getCurrent();
ptm.ruleFinished(result);}	 EOF
;

ruleMModel returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MModel");
			 }
(({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(1)).eContents().get(1)).eContents().get(0)));}temp_MComposite=
ruleMComposite{if (temp_MComposite != null) {
  hasContent = true;
  ptm.setModelElement(temp_MComposite);
  factory.set($result,"rootComposite",convert(temp_MComposite),false);
  ptm.ruleFinished(temp_MComposite);
} else {
  ptm.destroyNode();
}
}
)

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(1)).eContents().get(1)).eContents().get(1)));}temp_Template=
ruleTemplate{if (temp_Template != null) {
  hasContent = true;
  ptm.setModelElement(temp_Template);
  factory.add($result,"templates",convert(temp_Template),false);
  ptm.ruleFinished(temp_Template);
} else {
  ptm.destroyNode();
}
}
)*
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMComposite returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MComposite");
			 }
(({skipCurrentToken = false;}'composite'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(1)));
  factory.set($result,"id",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)?

(({skipCurrentToken = false;}'['{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)

(({skipCurrentToken = false;}'|'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)
)*

({skipCurrentToken = false;}']'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(2)).eContents().get(3)));
  ptm.ruleFinished(getLastToken());
}})
)?

(({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

((({skipCurrentToken = false;}'layout'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(2)));}temp_MLayout=
ruleMLayout{if (temp_MLayout != null) {
  hasContent = true;
  ptm.setModelElement(temp_MLayout);
  factory.set($result,"layout",convert(temp_MLayout),false);
  ptm.ruleFinished(temp_MLayout);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'layoutData'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(2)));}temp_MLayoutData=
ruleMLayoutData{if (temp_MLayoutData != null) {
  hasContent = true;
  ptm.setModelElement(temp_MLayoutData);
  factory.set($result,"layoutdata",convert(temp_MLayoutData),false);
  ptm.ruleFinished(temp_MLayoutData);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'bgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"background",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'fgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"foreground",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'font'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(4)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(4)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(4)).eContents().get(2)));}temp_MFont=
ruleMFont{if (temp_MFont != null) {
  hasContent = true;
  ptm.setModelElement(temp_MFont);
  factory.set($result,"font",convert(temp_MFont),false);
  ptm.ruleFinished(temp_MFont);
} else {
  ptm.destroyNode();
}
}
)
)
)*

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(3)).eContents().get(2)));
  ptm.ruleFinished(getLastToken());
}})
)?

({skipCurrentToken = false;}'{'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(4)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(5)));}temp_MControl=
ruleMControl{if (temp_MControl != null) {
  hasContent = true;
  ptm.setModelElement(temp_MControl);
  factory.add($result,"children",convert(temp_MControl),false);
  ptm.ruleFinished(temp_MControl);
} else {
  ptm.destroyNode();
}
}
)*

({skipCurrentToken = false;}'}'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(2)).eContents().get(1)).eContents().get(6)));
  ptm.ruleFinished(getLastToken());
}})
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMColor returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MColor");
			 }
(({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(0)));
  factory.set($result,"red",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)

({skipCurrentToken = false;}','{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(2)));
  factory.set($result,"green",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)

({skipCurrentToken = false;}','{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(3)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(4)));
  factory.set($result,"blue",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMControl returns [EObject result]
:
        temp_mcomposite=ruleMComposite {$result=temp_mcomposite;}	|        temp_mbutton=ruleMButton {$result=temp_mbutton;}	|        temp_mlabel=ruleMLabel {$result=temp_mlabel;}	|        temp_mtext=ruleMText {$result=temp_mtext;}	|        temp_mcombo=ruleMCombo {$result=temp_mcombo;}	|        temp_templateusage=ruleTemplateUsage {$result=temp_templateusage;}	;

ruleMButton returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MButton");
			 }
(({skipCurrentToken = false;}'button'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(1)));
  factory.set($result,"id",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)?

(({skipCurrentToken = false;}'['{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)

(({skipCurrentToken = false;}'|'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)
)*

({skipCurrentToken = false;}']'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(2)).eContents().get(3)));
  ptm.ruleFinished(getLastToken());
}})
)?

(({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

((({skipCurrentToken = false;}'layoutData'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(2)));}temp_MLayoutData=
ruleMLayoutData{if (temp_MLayoutData != null) {
  hasContent = true;
  ptm.setModelElement(temp_MLayoutData);
  factory.set($result,"layoutdata",convert(temp_MLayoutData),false);
  ptm.ruleFinished(temp_MLayoutData);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'bgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"background",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'fgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"foreground",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'font'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(2)));}temp_MFont=
ruleMFont{if (temp_MFont != null) {
  hasContent = true;
  ptm.setModelElement(temp_MFont);
  factory.set($result,"font",convert(temp_MFont),false);
  ptm.ruleFinished(temp_MFont);
} else {
  ptm.destroyNode();
}
}
)
)
)*

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(3)).eContents().get(2)));
  ptm.ruleFinished(getLastToken());
}})
)?

({skipCurrentToken = false;}'{'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(4)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(5)));}temp_Parameter=
ruleParameter{if (temp_Parameter != null) {
  hasContent = true;
  ptm.setModelElement(temp_Parameter);
  factory.set($result,"name",convert(temp_Parameter),false);
  ptm.ruleFinished(temp_Parameter);
} else {
  ptm.destroyNode();
}
}
)

({skipCurrentToken = false;}'onClick'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(6)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(7)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(8)));}temp_MActionHandler=
ruleMActionHandler{if (temp_MActionHandler != null) {
  hasContent = true;
  ptm.setModelElement(temp_MActionHandler);
  factory.set($result,"action",convert(temp_MActionHandler),false);
  ptm.ruleFinished(temp_MActionHandler);
} else {
  ptm.destroyNode();
}
}
)

({skipCurrentToken = false;}'}'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(5)).eContents().get(1)).eContents().get(9)));
  ptm.ruleFinished(getLastToken());
}})
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMLabel returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MLabel");
			 }
(({skipCurrentToken = false;}'label'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(1)));
  factory.set($result,"id",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)?

(({skipCurrentToken = false;}'['{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)

(({skipCurrentToken = false;}'|'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)
)*

({skipCurrentToken = false;}']'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(2)).eContents().get(3)));
  ptm.ruleFinished(getLastToken());
}})
)?

(({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

((({skipCurrentToken = false;}'layoutData'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(2)));}temp_MLayoutData=
ruleMLayoutData{if (temp_MLayoutData != null) {
  hasContent = true;
  ptm.setModelElement(temp_MLayoutData);
  factory.set($result,"layoutdata",convert(temp_MLayoutData),false);
  ptm.ruleFinished(temp_MLayoutData);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'bgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"background",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'fgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"foreground",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'font'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(2)));}temp_MFont=
ruleMFont{if (temp_MFont != null) {
  hasContent = true;
  ptm.setModelElement(temp_MFont);
  factory.set($result,"font",convert(temp_MFont),false);
  ptm.ruleFinished(temp_MFont);
} else {
  ptm.destroyNode();
}
}
)
)
)*

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(3)).eContents().get(2)));
  ptm.ruleFinished(getLastToken());
}})
)?

({skipCurrentToken = false;}'{'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(4)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(5)));}temp_Parameter=
ruleParameter{if (temp_Parameter != null) {
  hasContent = true;
  ptm.setModelElement(temp_Parameter);
  factory.set($result,"name",convert(temp_Parameter),false);
  ptm.ruleFinished(temp_Parameter);
} else {
  ptm.destroyNode();
}
}
)

({skipCurrentToken = false;}'}'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(6)).eContents().get(1)).eContents().get(6)));
  ptm.ruleFinished(getLastToken());
}})
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleParameter returns [EObject result]
:
        temp_constant=ruleConstant {$result=temp_constant;}	|        temp_variable=ruleVariable {$result=temp_variable;}	;

ruleConstant returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "Constant");
			 }
({skipCurrentToken = false;}
RULE_STRING{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)));
  factory.set($result,"value",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleVariable returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "Variable");
			 }
({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(9)).eContents().get(1)));
  factory.set($result,"value",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleTemplate returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "Template");
			 }
(({skipCurrentToken = false;}'template'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(1)));
  factory.set($result,"name",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)

({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(2)));
  ptm.ruleFinished(getLastToken());
}})

(({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  factory.add($result,"variables",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)

(({skipCurrentToken = false;}','{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)));
  factory.add($result,"variables",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)*
)?

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(4)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'{'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(5)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(6)));}temp_MControl=
ruleMControl{if (temp_MControl != null) {
  hasContent = true;
  ptm.setModelElement(temp_MControl);
  factory.add($result,"widgets",convert(temp_MControl),false);
  ptm.ruleFinished(temp_MControl);
} else {
  ptm.destroyNode();
}
}
)+

({skipCurrentToken = false;}'}'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(10)).eContents().get(1)).eContents().get(7)));
  ptm.ruleFinished(getLastToken());
}})
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleTemplateUsage returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "TemplateUsage");
			 }
(({skipCurrentToken = false;}
RULE_ID
{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(11)).eContents().get(1)).eContents().get(0)));
  factory.set($result,"template",convert(temp),true);
  ptm.ruleFinished(temp);
}}
)

({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(11)).eContents().get(1)).eContents().get(1)));
  factory.set($result,"id",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)

({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(11)).eContents().get(1)).eContents().get(2)));
  ptm.ruleFinished(getLastToken());
}})

(({skipCurrentToken = false;}
RULE_STRING{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(11)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  factory.add($result,"parameters",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)

(({skipCurrentToken = false;}','{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(11)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_STRING{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(11)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)));
  factory.add($result,"parameters",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)*
)?

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(11)).eContents().get(1)).eContents().get(4)));
  ptm.ruleFinished(getLastToken());
}})
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMText returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MText");
			 }
(({skipCurrentToken = false;}'text'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(1)));
  factory.set($result,"id",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)?

(({skipCurrentToken = false;}'['{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)

(({skipCurrentToken = false;}'|'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)
)*

({skipCurrentToken = false;}']'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(2)).eContents().get(3)));
  ptm.ruleFinished(getLastToken());
}})
)?

(({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

((({skipCurrentToken = false;}'layoutData'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(2)));}temp_MLayoutData=
ruleMLayoutData{if (temp_MLayoutData != null) {
  hasContent = true;
  ptm.setModelElement(temp_MLayoutData);
  factory.set($result,"layoutdata",convert(temp_MLayoutData),false);
  ptm.ruleFinished(temp_MLayoutData);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'bgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"background",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'fgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"foreground",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'font'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(2)));}temp_MFont=
ruleMFont{if (temp_MFont != null) {
  hasContent = true;
  ptm.setModelElement(temp_MFont);
  factory.set($result,"font",convert(temp_MFont),false);
  ptm.ruleFinished(temp_MFont);
} else {
  ptm.destroyNode();
}
}
)
)
)*

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)).eContents().get(2)));
  ptm.ruleFinished(getLastToken());
}})
)?

(({skipCurrentToken = false;}'{'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(4)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(4)).eContents().get(1)));}temp_Parameter=
ruleParameter{if (temp_Parameter != null) {
  hasContent = true;
  ptm.setModelElement(temp_Parameter);
  factory.set($result,"value",convert(temp_Parameter),false);
  ptm.ruleFinished(temp_Parameter);
} else {
  ptm.destroyNode();
}
}
)

({skipCurrentToken = false;}'}'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(4)).eContents().get(2)));
  ptm.ruleFinished(getLastToken());
}})
)?
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMLayout returns [EObject result]
:
        temp_mgridlayout=ruleMGridLayout {$result=temp_mgridlayout;}	;

ruleMLayoutData returns [EObject result]
:
        temp_mgriddata=ruleMGridData {$result=temp_mgriddata;}	;

ruleMGridLayout returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MGridLayout");
			 }
(({skipCurrentToken = false;}'grid'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

(({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
  factory.set($result,"numColumns",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)?

({skipCurrentToken = false;}
'equalWidth'{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(2)));
  factory.set($result,"makeColumnsEqualWidth",true);
  ptm.ruleFinished(temp);
}}
)?

(({skipCurrentToken = false;}'wMargin'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'='{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(3)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(3)).eContents().get(2)));
  factory.set($result,"marginWidth",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)?

(({skipCurrentToken = false;}'hMargin'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(4)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'='{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(4)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(4)).eContents().get(2)));
  factory.set($result,"marginHeight",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)?

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(15)).eContents().get(1)).eContents().get(1)).eContents().get(5)));
  ptm.ruleFinished(getLastToken());
}})
)?
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMGridData returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MGridData");
			 }
(({skipCurrentToken = false;}'gridData'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

(({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

(({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(1)).eContents().get(0)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.set($result,"horizontalAlignment",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)

({skipCurrentToken = false;}','{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(1)).eContents().get(2)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.set($result,"verticalAlignment",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)
)?

((({skipCurrentToken = false;}'wHint'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(0)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'='{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(0)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(0)).eContents().get(2)));
  factory.set($result,"widthHint",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)
	|
(({skipCurrentToken = false;}'hHint'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'='{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(1)).eContents().get(2)));
  factory.set($result,"heightHint",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)
	|
(({skipCurrentToken = false;}'hSpan'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'='{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(2)));
  factory.set($result,"horizontalSpan",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)
	|
(({skipCurrentToken = false;}'vSpan'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'='{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(3)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(3)).eContents().get(2)));
  factory.set($result,"verticalSpan",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)
)
	|
({skipCurrentToken = false;}
'grabHSpace'{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(4)));
  factory.set($result,"grabExcessHorizontalSpace",true);
  ptm.ruleFinished(temp);
}}
)
	|
({skipCurrentToken = false;}
'grabVSpace'{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(2)).eContents().get(5)));
  factory.set($result,"grabExcessVerticalSpace",true);
  ptm.ruleFinished(temp);
}}
)
)*

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(16)).eContents().get(1)).eContents().get(1)).eContents().get(3)));
  ptm.ruleFinished(getLastToken());
}})
)?
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMSWT returns [Enumerator r] :
		 'beginning'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(1)));
$r=factory.enumLit("", "MSWT","BEGINNING");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'center'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(2)));
$r=factory.enumLit("", "MSWT","CENTER");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'end'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(3)));
$r=factory.enumLit("", "MSWT","END");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'fill'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(4)));
$r=factory.enumLit("", "MSWT","FILL");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'default'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(5)));
$r=factory.enumLit("", "MSWT","DEFAULT");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'border'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(6)));
$r=factory.enumLit("", "MSWT","BORDER");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'single'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(7)));
$r=factory.enumLit("", "MSWT","SINGLE");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'multi'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(8)));
$r=factory.enumLit("", "MSWT","MULTI");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'check'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(9)));
$r=factory.enumLit("", "MSWT","CHECK");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'radio'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(10)));
$r=factory.enumLit("", "MSWT","RADIO");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'push'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(11)));
$r=factory.enumLit("", "MSWT","PUSH");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'toggle'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(12)));
$r=factory.enumLit("", "MSWT","TOGGLE");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'password'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(13)));
$r=factory.enumLit("", "MSWT","PASSWORD");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'readOnly'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(14)));
$r=factory.enumLit("", "MSWT","READ_ONLY");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'separator'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(15)));
$r=factory.enumLit("", "MSWT","SEPARATOR");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'bold'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(16)));
$r=factory.enumLit("", "MSWT","BOLD");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'italic'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(17)));
$r=factory.enumLit("", "MSWT","ITALIC");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
	 |		 'normal'
		 {ptm.createNode(((EObject)((EObject)xtextfile.eContents().get(17)).eContents().get(18)));
$r=factory.enumLit("", "MSWT","NORMAL");
ptm.setModelElement($r);
ptm.ruleFinished(getLastToken());
}
;

ruleMActionHandler returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MActionHandler");
			 }
(({skipCurrentToken = false;}'bundle'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(18)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'='{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(18)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(18)).eContents().get(1)).eContents().get(2)));}temp_QID=
ruleQID{if (temp_QID != null) {
  hasContent = true;
  factory.set($result,"bundleName",convert(temp_QID),false);
  ptm.ruleFinished(temp_QID);
} else {
  ptm.destroyNode();
}
}
)

({skipCurrentToken = false;}'class'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(18)).eContents().get(1)).eContents().get(3)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}'='{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(18)).eContents().get(1)).eContents().get(4)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(18)).eContents().get(1)).eContents().get(5)));}temp_QID=
ruleQID{if (temp_QID != null) {
  hasContent = true;
  factory.set($result,"class",convert(temp_QID),false);
  ptm.ruleFinished(temp_QID);
} else {
  ptm.destroyNode();
}
}
)
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleQID returns [String s] @init {StringBuffer buff = new StringBuffer(); boolean hasContent = false;} :
	 

((({skipCurrentToken = false;}
RULE_ID
{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(19)).eContents().get(0)).eContents().get(0)));
  ptm.ruleFinished(temp);
  if (temp.getType() == swtLexer.RULE_ID)
    temp.setText((String) convert(temp));
  buff.append(temp.getText());
}})
(((	{skipCurrentToken = false;}	'.' {if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(19)).eContents().get(0)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(temp);
  buff.append(temp.getText());
}}
)
({skipCurrentToken = false;}
RULE_ID
{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(19)).eContents().get(0)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(temp);
  if (temp.getType() == swtLexer.RULE_ID)
    temp.setText((String) convert(temp));
  buff.append(temp.getText());
}}))
)*)
)

{if (hasContent)
  $s =buff.toString();}
;
catch [RecognitionException re] {if (hasContent)
$s =buff.toString();
reportError(re);
recover(input,re);}

ruleMCombo returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MCombo");
			 }
(({skipCurrentToken = false;}'combo'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}
RULE_ID{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(1)));
  factory.set($result,"id",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)?

(({skipCurrentToken = false;}'['{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)

(({skipCurrentToken = false;}'|'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(2)).eContents().get(2)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)
)*

({skipCurrentToken = false;}']'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(2)).eContents().get(3)));
  ptm.ruleFinished(getLastToken());
}})
)?

(({skipCurrentToken = false;}'('{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

((({skipCurrentToken = false;}'layoutData'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(0)).eContents().get(2)));}temp_MLayoutData=
ruleMLayoutData{if (temp_MLayoutData != null) {
  hasContent = true;
  ptm.setModelElement(temp_MLayoutData);
  factory.set($result,"layoutdata",convert(temp_MLayoutData),false);
  ptm.ruleFinished(temp_MLayoutData);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'bgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(1)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"background",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'fgColor'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(2)).eContents().get(2)));}temp_MColor=
ruleMColor{if (temp_MColor != null) {
  hasContent = true;
  ptm.setModelElement(temp_MColor);
  factory.set($result,"foreground",convert(temp_MColor),false);
  ptm.ruleFinished(temp_MColor);
} else {
  ptm.destroyNode();
}
}
)
)
	|
(({skipCurrentToken = false;}'font'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(1)).eContents().get(3)).eContents().get(2)));}temp_MFont=
ruleMFont{if (temp_MFont != null) {
  hasContent = true;
  ptm.setModelElement(temp_MFont);
  factory.set($result,"font",convert(temp_MFont),false);
  ptm.ruleFinished(temp_MFont);
} else {
  ptm.destroyNode();
}
}
)
)
)*

({skipCurrentToken = false;}')'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(3)).eContents().get(2)));
  ptm.ruleFinished(getLastToken());
}})
)?

({skipCurrentToken = false;}'{'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(4)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(5)));}temp_Parameter=
ruleParameter{if (temp_Parameter != null) {
  hasContent = true;
  ptm.setModelElement(temp_Parameter);
  factory.add($result,"values",convert(temp_Parameter),false);
  ptm.ruleFinished(temp_Parameter);
} else {
  ptm.destroyNode();
}
}
)

(({skipCurrentToken = false;}'|'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(6)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(6)).eContents().get(1)));}temp_Parameter=
ruleParameter{if (temp_Parameter != null) {
  hasContent = true;
  ptm.setModelElement(temp_Parameter);
  factory.add($result,"values",convert(temp_Parameter),false);
  ptm.ruleFinished(temp_Parameter);
} else {
  ptm.destroyNode();
}
}
)
)*

(({skipCurrentToken = false;}'onClick'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(7)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({skipCurrentToken = false;}':'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(7)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(7)).eContents().get(2)));}temp_MActionHandler=
ruleMActionHandler{if (temp_MActionHandler != null) {
  hasContent = true;
  ptm.setModelElement(temp_MActionHandler);
  factory.set($result,"action",convert(temp_MActionHandler),false);
  ptm.ruleFinished(temp_MActionHandler);
} else {
  ptm.destroyNode();
}
}
)
)?

({skipCurrentToken = false;}'}'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(20)).eContents().get(1)).eContents().get(8)));
  ptm.ruleFinished(getLastToken());
}})
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

ruleMFont returns [EObject result]
@init {boolean hasContent = false;}
:
			{
				$result = factory.create("", "MFont");
			 }
(({skipCurrentToken = false;}
RULE_STRING{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(21)).eContents().get(1)).eContents().get(0)));
  factory.set($result,"name",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)?

(({skipCurrentToken = false;}
RULE_INT{if (!skipCurrentToken) {
  hasContent = true;
  Token temp = getLastToken();
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(21)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
  factory.set($result,"height",convert(temp),false);
  ptm.ruleFinished(temp);
}}
)

({skipCurrentToken = false;}'px'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(21)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
  ptm.ruleFinished(getLastToken());
}})
)?

(({ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(21)).eContents().get(1)).eContents().get(2)).eContents().get(0)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)

(({skipCurrentToken = false;}'|'{if (!skipCurrentToken) {
  hasContent = true;
  ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(21)).eContents().get(1)).eContents().get(2)).eContents().get(1)).eContents().get(0)));
  ptm.ruleFinished(getLastToken());
}})

({ptm.createNode(((EObject)((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(21)).eContents().get(1)).eContents().get(2)).eContents().get(1)).eContents().get(1)));}temp_MSWT=
ruleMSWT{if (temp_MSWT != null) {
  hasContent = true;
  factory.add($result,"style",convert(temp_MSWT),false);
  ptm.ruleFinished(temp_MSWT);
} else {
  ptm.destroyNode();
}
}
)
)*
)?
)
 {if (!hasContent)
  $result = null;};
catch [RecognitionException re] {if (!hasContent)
    $result = null;
reportError(re);
recover(input,re);}

RULE_ID :

	 ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
	 
;

RULE_STRING :

	 '\"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\"') )* '\"' |
	 '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\''
	 
;

RULE_INT :

	 ('-')?('0'..'9')+
	 
;

RULE_WS :

	 (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;}
	 
;

RULE_ML_COMMENT :

	 '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;}
	 
;

RULE_SL_COMMENT :

	 '//' ~('\n'|'\r')* '\r'? '\n' {$channel=HIDDEN;}
	 
;

